layui.use(['upload'], function () {
    var $ = layui.jquery
        , upload = layui.upload;
    var uploadInst = upload.render({
        elem: '#btn_main'
        ,url: '/admin/image/upload'
        ,done: function (res) {
            if(res.status == 0){
                return lay.msg('上传失败')
            }
            $('.big_image').html('<img src="'+res.result.image+'" class="layui-upload-img upload_img" id="main_img">')
        }
    })

    upload.render({
        elem: '#btn_banner'
        ,url: '/admin/image/upload'
        ,multiple: true
    })
})